package com.mqb;

import lombok.Data;

import java.time.LocalDateTime;

@Data
public class LoginMsg extends BaseMsg {
    private String sendId;

    private LoginEntity entity;

    public LoginMsg() {
    }

    public LoginMsg(String id, String sendId, LoginEntity entity) {
        super.id = id;
        super.msgType = MsgType.LOGIN.getCode();
        super.recId = "server";
        super.dateTime = LocalDateTime.now();
        this.sendId = sendId;
        this.entity = entity;
    }


    public LoginMsg(String id, String recId, String sendId, LoginEntity entity) {
        super.id = id;
        super.msgType = MsgType.LOGIN.getCode();
        super.recId = recId;
        super.dateTime = LocalDateTime.now();
        this.sendId = sendId;
        this.entity = entity;
    }


}
